{% extends 'admin-v2/layout.html.twig' %}

{% set menu = 'admin_v2_product_update_setting_tab' %}

{% set script_controller = 'content-resource/product-setting' %}

{% block main %}
  {{ web_macro.flash_messages() }}
  <form class="form-horizontal" action="{{ path('admin_v2_product_update_setting') }}" method="post" novalidate>
    <div class="form-group">
      <label class="col-md-2 control-label">
        {{ 'admin_v2.cloud_center.content_resource.product_update_setting'|trans }}
      </label>
      <div class="controls col-md-10 radios">
        <label>
          <input type="radio" name="type" value="auto"
                 data-tip="{{ 'admin_v2.cloud_center.content_resource.product_update_auto.tips'|trans }}"
                 {% if type|default('manual') == 'auto' %}checked{% endif %}>
          {{ 'admin_v2.cloud_center.content_resource.product_update_auto'|trans }}</label>
        <label>
          <input type="radio" name="type" value="manual"
                 data-tip="{{ 'admin_v2.cloud_center.content_resource.product_update_manual.tips'|trans }}"
                 {% if type|default('manual') == 'manual' %}checked{% endif %}>
          {{ 'admin_v2.cloud_center.content_resource.product_update_manual'|trans }}
        </label>
        <div class="help-block js-show-tips"></div>
      </div>

    </div>

    <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
    <div class="form-group">
      <div class="col-md-offset-2 col-md-8">
        <button type="submit" class="btn btn-primary mtl">{{ 'form.btn.save'|trans }}</button>
      </div>
    </div>
  </form>
{% endblock %}
